﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/User.Master" AutoEventWireup="true" CodeBehind="KC_WL_Query.aspx.cs" Inherits="CoolERP_Web.User.KC_WL_Query" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../Scripts/lhgdialog/lhgcore.min.js" type="text/javascript"></script>
<script src="../Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
<script type="text/javascript">
    function queryMX(id) {
        var dg = new J.dialog({ id: 'select', title: '查看库存明细', page: 'KCMX.aspx?type=01&id=' + id, iconTitle: false, cover: true, btnBar: false, rang: true, autoSize: true, width: 700 });
        dg.ShowDialog();
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class=tbHead_L></td>
        <td class=tbHead_M><div><B>物料库存管理</B></div></td>
        <td class=tbHead_R></td>
    </tr>
    <tr>
        <td class=tbBody_L></td>
        <td class=tbBody_M>
            <ul class=tags style="width:100%;">
                <li class=liTitle><div>库存查询</div></li>
            </ul>
            <table class="grvCSS" cellspacing="0" cellpadding=2 border="1" style="width:100%;border-collapse:collapse;">
                <tr>
                    <td>物料编号：<asp:TextBox ID="tbBH" runat="server" CssClass="textbox" MaxLength="64"></asp:TextBox></td>
                    <td>物料名称：<asp:TextBox ID="tbMC" runat="server" CssClass="textbox" MaxLength="64"></asp:TextBox></td>
                    <td>物料类型：<asp:DropDownList ID="ddlWLLX" runat="server" CssClass="dropdown"></asp:DropDownList></td>
                    <td>供应商：<asp:DropDownList ID="ddlGYSID" runat="server" CssClass="dropdown"></asp:DropDownList></td>
                    <td><asp:ImageButton ID="btnQuery" runat="server" ImageUrl="~/Images/Common/btn_query0.png" onclick="btnQuery_Click" />
                    <asp:ImageButton ID="btnReset" runat="server" ImageUrl="~/Images/Common/btn_reset0.png" OnClick="btnReset_Click" /></td>
                </tr>
            </table>
            <ul class=tags style="width:100%;">
                <li class=liTitle><div>物料列表</div></li>
                <li class=liRight><asp:ImageButton ID="btnAdd" runat="server" ImageUrl="~/Images/Common/btn_create0.png" PostBackUrl="~/User/KC_WL_Edit.aspx" /></li>
            </ul>
            <asp:GridView ID="GridView1" runat="server" DataKeyNames="ID" Width="100%" CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True"
                PageSize=20 ClientIDMode=Static OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                <ItemTemplate><%# (this.AspNetPager1.CurrentPageIndex - 1) * this.AspNetPager1.PageSize + Container.DataItemIndex + 1 %></ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="LXMC" HeaderText="物料类型"/>       
                <asp:BoundField DataField="BH" HeaderText="物料编号"/>
                <asp:BoundField DataField="MC" HeaderText="物料名称"/>
                <asp:BoundField DataField="GG" HeaderText="物料规格"/>   
                <asp:BoundField DataField="YS" HeaderText="颜色"/>    
                <asp:BoundField DataField="GYSMC" HeaderText="供应商"/>
                <asp:BoundField DataField="DWMC" HeaderText="库存单位"/>
                <asp:BoundField DataField="JLDWMC" HeaderText="计量单位"/>
                <asp:TemplateField HeaderText="最低库存">
                    <ItemTemplate><div style="float:right"><%# Convert.ToDecimal(Eval("ZDKCSL")).ToString("F")%></div></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="库存总量">
                    <ItemTemplate><div style="float:right"><asp:Label ID="labKC" runat="server"/></div></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="平均单价">
                    <ItemTemplate><div style="float:right"><%# Convert.ToDecimal(Eval("PJDJ")).ToString("0.0000")%></div></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="金额">
                    <ItemTemplate><div style="float:right"><%# (Convert.ToDecimal(Eval("PJDJ")) * Convert.ToDecimal(Eval("KCZL"))).ToString("C")%></div></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="库存明细">
                    <ItemTemplate><input type=button value="查看" class=btn_s onclick="queryMX('<%#Eval("WPID") %>')" /></ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerSettings Visible=false />
            </asp:GridView>
            <table cellpadding=5 cellspacing=0 border=0 width=100%>
                <tr>
                    <td>库存总计金额：<asp:Literal ID="liTotalMoney" runat="server"/></td>
                    <td align=right>本页小计金额：<asp:Literal ID="liPageMoney" runat="server"/></td>
                    <td width=90px></td>
                </tr>
            </table>
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CssClass="pager" UrlPaging="false" ShowCustomInfoSection="Left"
                FirstPageText="首页" LastPageText="尾页" PrevPageText="前页" NextPageText="后页" OnPageChanged="AspNetPager1_PageChanged" 
                TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" PageIndexBoxType="TextBox" ShowPageIndexBox="Always" 
                SubmitButtonText="Go" CustomInfoHTML="共%RecordCount%条数据，每页%PageSize%条，共%PageCount%页，当前为第%CurrentPageIndex%页">
            </webdiyer:AspNetPager>
            <asp:Panel ID="panMsg" runat="server" ClientIDMode=Static CssClass="msg24_attention" Visible=false>无相关数据</asp:Panel>
        </td>
        <td class=tbBody_R></td>
    </tr>
    <tr>
        <td class=tbFoot_L></td>
        <td class=tbFoot_M></td>
        <td class=tbFoot_R></td>
    </tr>
</table>
</asp:Content>